<template>
  Button: <s-button @click="handleCopyToClipboard('内容')">内容</s-button><br />
  <SButton type="danger">内容</SButton><br />
</template>
<script lang="ts" setup>
import { SButton } from '@wh/pro-components'
import { copyToClipboard } from '@wh/utils'
defineOptions({
  name: 'pro-button',
})

function handleCopyToClipboard(text: string) {
  copyToClipboard(text).then(message => {
    ElMessage({
      showClose: true,
      message,
      type: 'success',
    })
  })
}
console.log('页面加载')
</script>
